//
//  OrderGoddsListCell.m
//  CenturyCity
//
//  Created by beisheng03 on 2018/1/10.
//  Copyright © 2018年 beisheng. All rights reserved.
//

#import "OrderGoddsListCell.h"

@interface OrderGoddsListCell ()
@property (weak, nonatomic) IBOutlet UIImageView *leftImageView;
@property (weak, nonatomic) IBOutlet UILabel *topLabel;
@property (weak, nonatomic) IBOutlet UILabel *middleLabel;
@property (weak, nonatomic) IBOutlet UILabel *bottomLabel;
@property (weak, nonatomic) IBOutlet UILabel *conutLabel;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomMargin;

@end

@implementation OrderGoddsListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.topLabel.font = MYFONT(14);
    
    self.middleLabel.font = MYFONT(13);
    
    self.bottomLabel.font = MYFONT(15);
    
    self.conutLabel.font = MYFONT(16);
    
    self.middleLabel.textColor = darkGray;
    
    self.bottomMargin.constant = 0;
    
    self.bottomLabel.textColor = [UIColor redColor];
    
    self.middleLabel.text = @"";

    // Initialization code  
}


- (void)setModel:(OrderFGoddsListModel *)model{
    
    _model = model;
    
    [self.leftImageView sd_setImageWithURL:[NSURL URLWithString:_model.pic_cover_micro] placeholderImage:nil];
    
    self.conutLabel.text = [NSString stringWithFormat:@"x %@",_model.num];
    
        self.topLabel.text = _model.goods_name;

    
    
    
    
    
    if (_model.sku_name.length > 0) {
        
        self.middleLabel.text = _model.sku_name;


    }else{
        
        self.middleLabel.text = @"";

    }
  
    self.bottomLabel.text = [NSString stringWithFormat:@"%@P",_model.price];

    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
